package legoproject.TestStubs;

import legoproject.*;
import java.awt.*;
import javax.swing.*;

class SimpleSlider extends JPanel {

    private JSlider slider;

    public SimpleSlider(int start, String name) {
        super(new BorderLayout());
        slider = new JSlider(JSlider.HORIZONTAL, 0, 100, start);
        slider.setMajorTickSpacing(10);
        slider.setMinorTickSpacing(1);
        slider.setPaintTicks(true);
        slider.setPaintLabels(true);
        add(new Label(name), BorderLayout.NORTH);
        add(slider, BorderLayout.SOUTH);
        setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));
    }

    public int getValue() {
        return slider.getValue();
    }
}